home *** CD-ROM | disk | FTP | other *** search
- Path: mail2news.demon.co.uk!metsys.demon.co.uk
- From: John Standen <John@metsys.demon.co.uk>
- Newsgroups: comp.lang.c
- Subject: What to do when feof() is NOT feof()
- Date: Sat, 17 Feb 96 11:00:14 GMT
- Organization: JHS Systems & Software
- Message-ID: <824554814snz@metsys.demon.co.uk>
- Reply-To: John@metsys.demon.co.uk
- X-NNTP-Posting-Host: metsys.demon.co.uk
- X-Newsreader: Demon Internet Simple News v1.30
- X-Mail2News-Path: metsys.demon.co.uk
-
- I have a function in a program which is reading each character
- in a file of some 700k characters.
-
- The do{ while !feof(in) sometimes causes the function to terminate
- very early in the file.
-
- I wrote a utility to read the file and give the line number of
- feof(in)......it returns ffff sometimes as early as line 200 in
- a 30,000 line file.
-
- Any have any suggestions on the best way of coding a
-
- do{
-
- }while not the real feof(in) ignore all other feof(in)'s
-
-
- These files get the data via radio, satellite, long distance telephone,
- etc, somewhere they get the feof as a corrupt character.
-
- So there could be any number of EOF's in the file.
-
- John
- --
- Douglas John Standen
-